<div id="Breadcrumb" class="Breadcrumb">
                    <ul>
                        <li class="first"><a href="<?php echo base_url();?>">Trang chủ </a></li>
                        <li><span>Sản phẩm ưa thích</span></li>    
                    </ul>
                </div>
                <div class="Clear" ></div>
                
                <div id="cphMain_Content"><div id="cphMain_ctl00_ContentPaneTop" class="top"></div>
                <div id="cphMain_ctl00_LeftPane" class="left">
                    <div id="cate-menu" class="DefaultModule cate-menu">
                        <div class="defaultTitle cate-menu-title">
                            <span>Danh mục sản phẩm</span>
                        </div>
                        <div class="defaultContent cate-menu-content">
                            <ul>
                                <?php if(!empty($pcat)){
                                    $i=0;
                                    foreach ($pcat as $po){
                                        $i++;
                                    ?>
                                <li class="level0 level0-<?php echo $po->id;?> <?php if($i==1){echo 'first';}?>">
                                    <a href="<?php echo base_url().'danh-muc/'.$po->alias.'.html'?>"><span><?php echo $po->title;?></span></a>
                                    <ul style="display: block;">
                                      <?php if(!empty($mProduct[$po->id])){
                                        $j=0;
                                        foreach ($mProduct[$po->id] as $mpo){
                                            $j++;
                                        ?>
                                        <li class="level1 level1-<?php echo $mpo->id;?> <?php if($j==1){echo 'first';}?>">
                                            <a href="<?php echo base_url().'danh-muc/'.$mpo->alias.'.html'?>"><span><?php echo $mpo->title;?></span></a>
                                            <ul style="display: none;">
                                            </ul>
                                        </li> 
                                      <?php } }else{echo ' <li class="level1 level1-114137 first">Đang cập nhập...</li>';}?>
                                    </ul>
                                </li>     
                               <?php } }else{echo ' <li class="level0 level0-127109 current first">Đang cập nhập...</li>';}?>
                                
                                
                            </ul>
                        </div><!--end cate-menu-content-->
                        <div class="defaultFooter cate-menu-footer"><div></div></div>
                    </div><!--end cate-menu-->
                </div><!--end cphMain_ctl00_LeftPane-->						
                <style>
                    .abc a{float:left}
                </style>
                <div style="float:left; width:823px;">
                    <div id="cphMain_ctl00_rightContentPane" class="rightcenter">
                        <div id="TextHTML-Module" class="DefaultModule">
                            <div class="abc" style="padding-bottom:10px;">
                            <?php if(!empty($nPnews)){
                                $i=0;
                                foreach ($nPnews as $nP){
                                  $i++;    
                            ?>
                        	  <a href="<?php echo base_url().$nP->alias.'.4.html';?>" target="_blank"><img alt="" src="<?php echo $nP->image;?>" style="
                              <?php if($i==1){
                                    echo "width: 264px; height: 120px";}else if($i==2){
                                    echo "width: 275px; height: 120px";}else{
                                    echo "width: 270px; height: 120px";} ?>
                              " /></a>
                            <?php }}?>
                            <div class="Clear"></div>
                         </div>      
                        </div>
                
                        <style type="text/css">
                        .InfoMessage{ background: #EFF8FA; color: #555555; margin-bottom: 10px; padding: 6px; padding-bottom: 1px; }
                        .InfoMessage p{ line-height: 1.3; margin-bottom: 15px; }
                        .listing-type-list .disable{ display: none; }
                        </style>
                        
                        </script>
                        <div class="ProductListContainer ListItems DefaultModule"> 
                            <div class="category-title defaultTitle productlist-title">
                                <h1>Sản phẩm ưa thích</h1>
                            </div>
                            <div class="TopContent">    
                            </div>
                            <div id="ProductList" class="defaultContent listing-type-list productlist-content catalog-listing">
                              <?php if(!empty($product)){
                                $k=0;
                                $i=0;
                                $sum= count($product); 
                                foreach ($product as $prr){
                                    $k++;
                                    $i++;
                                    if((($k-1)%4)==0){
                                        echo '<ul class="ProductList First">';
                                    } 
                                    if(($i%2)!=0){ 
                              ?>  
                                    <li class="Odd">
                                        <div id="ProductImage" class="ProductImage ProductImageTooltip">
                                            <a rel="<?php echo $prr->id?>" class="#tooltip<?php echo $prr->id;?>" 
                                                href='<?php echo base_url().$prr->alias.'.3.html';?>'
                                                productname="<?php echo $prr->title;?>"
                                                description="<?php echo $prr->metades;?>"
                                                thumbnail="<?php echo $prr->image;?>"
                                                thumbnailerror="<?php echo base_url();?>/Thumbnail.ashx?img=<?php echo $prr->image;?>&width=350&height=300"
                                                promotion="">
                                                <img src="<?php echo $prr->image;?>" alt="" title="<?php echo $prr->title?>" onerror="this.src='<?php echo base_url();?>/Thumbnail.ashx?img=<?php echo $prr->image;?>&width=115&height=115'" width="115px" height="115px" />
                                            </a>
                                        </div>
                                        <?php if($prr->km > 0){
                                                    $giakm = round(((($prr->price - $prr->km)/($prr->price))*100),0);?>
                                               
												<div class="saleFlag iconSprite ">
													-<?php echo $giakm;?><span>%</span></div>
                                                <?php  }else{?>
												<div class="saleFlag iconSprite disable">
													</div>
                                                <?php }?>
                                        <div class="ProductDetails">
                                            <strong><a href='<?php echo base_url().$prr->alias.'.3.html';?>'>
                                                <?php echo $prr->title;?><span class="#tooltipPromotion<?php echo $prr->id;?>"></span>
                                            </a></strong>
                                        </div>
                                        <div class="ProductPrice">
                                            <div class="retail-price disable">
                                                <span class="price-label"></span><span class="price"><strike class="RetailPriceValue">
                                                    </strike>
                                                </span>
                                            </div>
                                            <div class="special-price">
                                                <span class="price-label"></span><span class="price"><em>
                                                   <?php
                                                         if($prr->km>0){echo $prr->km;}else{
                                                             echo $prr->price;}?> ₫</em>
                                                </span>
                                            </div>
                                        </div>
                                        <div class="ProductRating Rating-1" style="display: ;">
                                            <div class="RatingImage">
                                            </div>
                                        </div>
                                        
                                        <div class="ProductCompareButton" style="display: none;">
                                            <label>
                                                <input id="compare-<?php echo $prr->id;?>" type="checkbox" value="" onclick="javascript:clickCheckBoxCompare(<?php echo $prr->id;?>);" />
                                                So sánh
                                            </label>
                                        </div>
                                        <div class="ProductActionAdd"><a href="javascript:;" onclick="javascript:PopupCart(<?php echo $prr->id;?>);"><span>Mua hàng</span></a></div>
                                    </li>
                                    <?php }else{?>
                                    <li class="Even">
                                        <div id="ProductImage" class="ProductImage ProductImageTooltip">
                                            <a rel="<?php echo $prr->id?>" class="#tooltip<?php echo $prr->id;?>" 
                                                href='<?php echo base_url().$prr->alias.'.3.html';?>'
                                                productname="<?php echo $prr->title;?>"
                                                description="<?php echo $prr->metades;?>"
                                                thumbnail="<?php echo $prr->image;?>"
                                                thumbnailerror="<?php echo base_url();?>/Thumbnail.ashx?img=<?php echo $prr->image;?>&width=350&height=300"
                                                promotion="">
                                                <img src="<?php echo $prr->image;?>" alt="" title="<?php echo $prr->title?>" onerror="this.src='<?php echo base_url();?>/Thumbnail.ashx?img=<?php echo $prr->image;?>&width=115&height=115'" width="115px" height="115px"/>
                                            </a>
                                        </div>
                                        <?php if($prr->km > 0){
                                                    $giakm = round(((($prr->price - $prr->km)/($prr->price))*100),0);?>
                                               
												<div class="saleFlag iconSprite ">
													-<?php echo $giakm;?><span>%</span></div>
                                                <?php  }else{?>
												<div class="saleFlag iconSprite disable">
													</div>
                                                <?php }?>
                                        <div class="ProductDetails">
                                            <strong><a href='<?php echo base_url().$prr->alias.'.3.html';?>'>
                                                <?php echo $prr->title;?><span class="#tooltipPromotion<?php echo $prr->id;?>"></span>
                                            </a></strong>
                                        </div>
                                        <div class="ProductPrice">
                                            <div class="retail-price disable">
                                                <span class="price-label"></span><span class="price"><strike class="RetailPriceValue">
                                                    </strike>
                                                </span>
                                            </div>
                                            <div class="special-price">
                                                <span class="price-label"></span><span class="price"><em>
                                                   <?php
                                                         if($prr->km>0){echo $prr->km;}else{
                                                             echo $prr->price;}?> ₫</em>
                                                </span>
                                            </div>
                                        </div>
                                        <div class="ProductRating Rating-1" style="display: ;">
                                            <div class="RatingImage">
                                            </div>
                                        </div>
                                        
                                        <div class="ProductCompareButton" style="display: none;">
                                            <label>
                                                <input id="compare-<?php echo $prr->id;?>" type="checkbox" value="" onclick="javascript:clickCheckBoxCompare(<?php echo $prr->id;?>);" />
                                                So sánh
                                            </label>
                                        </div>
                                        <div class="ProductActionAdd"><a href="javascript:;" onclick="javascript:PopupCart(<?php echo $prr->id;?>);"><span>Mua hàng</span></a></div>
                                     </li>
                                <?php 
                                }
                                     if(($k%4)== 0 && $k != 0)
                                                {
                                                    echo '</ul>';
                                                }
                                    if(($k%4)!= 0 && ($sum %4)!= 0 && $k==$sum)
                                                   {
                                                    echo '</ul>';
                                                   }
                                }}else {echo 'Không có sản phẩm nào...';}?>
                                <div class="clear">
                                </div>
                                
                                <div class="compare-button">
                                    <a id="bottom_compare" href="#comparison" style="display: none;">
                                        <span>So sánh</span> </a>
                                </div>
                                
                                <div class="clear"></div>
                                
                                <link rel="Stylesheet" href="http://static.bizwebmedia.net/Css/pagenavigation.css" type="text/css" />
                                <div class="PageNavigation" style="padding-bottom: 10px; padding-top: 10px;" align="center">
                                     <?php if(!empty($product)){echo $this->pagination->create_links();} ?>
                                </div>
                        
                            </div>
                            <div class="clear defaultFooter productlist-footer">
                                <div>
                                </div>
                            </div>
                        </div><!--end ProductListContainer ListItems DefaultModule-->
                
                        <div id="productReviewPopup" class="hidden"></div>
                        <script type="text/javascript" src="http://static.bizwebmedia.net/Extensions/Js/jquery.tooltip.min.js"></script>
                        <script type="text/javascript">
                        $j(function () {
                            $j("#ProductList .ProductImageTooltip a").each(function () {
                                var productname = $j(this).attr("productname");
                                var thumbnail = $j(this).attr("thumbnail");
                                var thumbnailerror = $j(this).attr("thumbnailerror");
                                var description = $j(this).attr("description");
                                var promotion = $j(this).attr("promotion");
                                $j(this).bind("mouseover", function () {
                                    var promotionHTML = '';
                                    if (promotion != '') promotionHTML = '<div class="promotion-description">' + promotion + '</div>';
                                    var returnHTML =
                        			    '<div class="tooltip_name">' + productname + '</div>' +
                        			    '<div class="tooltip_picture"><img src="' + thumbnail + '" title="' + productname + '" alt="' + productname + '" onerror="this.src=\'' + thumbnailerror + '\'" /></div>' +
                        			    '<div class="tooltip_description">' + description + '</div>' +
                        			    promotionHTML +
                        			    '<div class="teaser"></div>';
                                    $j("#productReviewPopup").html(returnHTML);
                                });
                        
                                $j(this).tooltip({
                                    track: true, delay: 0, showURL: false, bodyHandler: function () { return $j("#productReviewPopup").html(); }
                                });
                            });
                        });
                        </script>
                        <input type="hidden" name="ctl00$cphMain$ctl00$ctl08$ctl00$hdCompare" id="cphMain_ctl00_ctl08_ctl00_hdCompare" />
                        <script type="text/javascript">
                        $j(document).ready(function () {
                            $j("a#bottom_compare").fancybox({
                                maxWidth: 1000, maxHeight: 600, fitToView: false, width: "100%", height: "100%", openEffect: "fade", closeEffect: "fade",
                                beforeLoad: function () {
                                    var productIds = $j("[id$='hdCompare']").val();
                                    if (productIds == '') { alert("Yêu cầu chọn sản phẩm để so sánh."); return; }
                                    var ids = productIds.substring(0, productIds.length - 1);
                                    if (ids.indexOf(',') <= 0) { alert("Yêu cầu chọn sản phẩm để so sánh."); return; }
                                    var iframeUrl = '/WebPages/ProductComparison.aspx?siteId=' + 6124 + '&productIds=' + ids;
                                    var htmlValue =
                                        '<iframe id="comparisonHolder" src="' + iframeUrl + '" frameborder="0" scrolling="no" width="980px" height="480px"></iframe>' +
                                        '<div style="text-align: right; color: #999;">' +
                                            '<i><strong style="color: #F00;">(*)</strong>Chú ý: Chỉ so sánh tối đa 3 sản phẩm.</i>' +
                                        '</div>';
                                    $j('#comparison').html(htmlValue);
                                }
                            });
                        });
                        function clickCheckBoxCompare(id) {
                            var objCheck = document.getElementById('compare-' + id);
                            var objSel = document.getElementById('cphMain_ctl00_ctl08_ctl00_hdCompare');
                            var currentString = objSel.value;
                            var newString = '';
                            if (objCheck.checked == true) {
                                if (currentString.indexOf(id + ',') == -1) newString = currentString + id + ',';
                            }
                            else { newString = currentString.replace(id + ',', ''); }
                            objSel.value = newString;
                            var productCompare = newString.substring(0, newString.length - 1);
                            if (productCompare == '') $j('a#bottom_compare').hide();
                            else $j('a#bottom_compare').show();
                        }
                        </script>
                        <div style="display: none;">
                            <div id="comparison" style="width: 1000px; height: 500px; background-color: #FFF;"></div>
                        </div>
                        <span class="hidden"></span>
                        
                
                    </div><!--end phMain_ctl00_rightContentPane-->
                    <div id="cphMain_ctl00_ContentPane" class="center"></div>
                    <div id="cphMain_ctl00_RightPane" class="right"></div>
                </div>
        </div>
</div>
<div class="Clear"></div>